Data Structures Interview Questions and Answers
Ques 16. In an AVL tree, at what condition the balancing is to be done?
If the pivotal value (or the Height factor) is greater than 1 or less than 1.
Ques 17. Minimum number of queues needed to implement the priority queue?
Two. One queue is used for actual storing of data and another for storing priorities.
Ques 18. How many different trees are possible with 10 nodes ?
1014 - For example, consider a tree with 3 nodes(n=3), it will have the maximum combination of 5 different (ie, 23 - 3 =? 5) trees.
Ques 19. What is a node class?
A node class is a class that, relies on the base class for services and implementation, provides a wider interface to users than its base class, relies primarily on virtual functions in its public interface depends on all its direct and indirect base class can be understood only in the context of the base class can be used as base for further derivation
can be used to create objects. A node class is a class that has added new services or functionality beyond the services inherited from its base class.
Ques 20. When can you tell that a memory leak will occur?
A memory leak occurs when a program loses the ability to free a block of dynamically allocated memory.
Most helpful rated by users:
- What is data structure?
- List out the areas in which data structures are applied extensively?
- What is the data structures used to perform recursion?
- If you are using C language to implement the heterogeneous linked list, what pointer type will you use?
- What are the methods available in storing sequential files ?